import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import NotFund from './pages/not-fund';
import { Toaster } from 'react-hot-toast';
import BasisLayout from './layout';
import Home from './pages/home';
import GameDetail from './pages/detail';

function App() {
  return (
    <Router>
      <Routes>
        <Route path='/' element={<BasisLayout />}>
          <Route path="/home" element={<Home />} />
          <Route path="/" element={<Navigate to="/home" />} />
          <Route path='/detail/:id' element={<GameDetail />} />
          <Route path='*' element={<NotFund />} />
        </Route>
      </Routes>
      <div><Toaster/></div>
    </Router>
  );
}

export default App;
